package cn.exrick.xboot.modules.transport.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author gj
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "创建订单")
public class CreateOrdersParam  {

    @ApiModelProperty(value = "订单线路id")
    @NotNull(message = "订单线路id不能为空")
    private Long routeId;

    @ApiModelProperty(value = "路线公里数")
    @NotNull(message = "路线公里数不能为空")
    private Integer kilometers;

    @ApiModelProperty(value = "订单起运地区")
    @NotNull(message = "订单起运地区不能为空")
    private Long originRegionId;

    @ApiModelProperty(value = "订单起运详细地址")
    @NotNull(message = "订单起运详细地址不能为空")
    private String originAddress;

    @ApiModelProperty(value = "订单起运详细地址坐标")
    @NotNull(message = "订单起运详细地址坐标不能为空")
    private String originAddressCoordinates;

    @ApiModelProperty(value = "起运点公里数")
    @NotNull(message = "起运点公里数不能为空")
    private Integer originAddressKms;

    @ApiModelProperty(value = "订单目的地地区")
    @NotNull(message = "订单目的地地区不能为空")
    private Long destinationRegionId;

    @ApiModelProperty(value = "订单目的地详细地址")
    @NotNull(message = "订单目的地详细地址不能为空")
    private String destinationAddress;

    @ApiModelProperty(value = "订单目的地详细地址坐标")
    @NotNull(message = "订单目的地详细地址坐标不能为空")
    private String destinationAddressCoordinates;

    @ApiModelProperty(value = "目的地公里数")
    @NotNull(message = "目的地公里数不能为空")
    private Integer destinationAddressKms;

    private Long senderId;

    @ApiModelProperty(value = "发货人姓名")
    @NotNull(message = "发货人姓名不能为空")
    private String senderName;

    @ApiModelProperty(value = "发货人手机号码")
    @NotNull(message = "发货人手机号码不能为空")
    private String senderPhone;

    @ApiModelProperty(value = "收货人姓名")
    @NotNull(message = "收货人姓名不能为空")
    private String receiverName;

    @ApiModelProperty(value = "收货人手机号码")
    @NotNull(message = "收货人手机号码不能为空")
    private String receiverPhone;

    @ApiModelProperty(value = "订单总金额")
    @NotNull(message = "订单总金额不能为空")
    private BigDecimal orderAmount;

    @ApiModelProperty(value = "线路总金额")
    private BigDecimal routeAmount;

    @ApiModelProperty(value = "保险金额")
    private BigDecimal insuranceAmount;

    @ApiModelProperty(value = "优惠金额")
    @NotNull(message = "优惠金额不能为空")
    private BigDecimal discountAmount;

    @ApiModelProperty(value = "起运地地跑金额")
    @NotNull(message = "起运地地跑金额不能为空")
    private BigDecimal originAmount;

    @ApiModelProperty(value = "目的地地跑金额")
    @NotNull(message = "目的地地跑金额不能为空")
    private BigDecimal destinationAmount;

    @ApiModelProperty(value = "订单数量")
    @NotNull(message = "订单数量不能为空")
    private Integer quantity;

    @ApiModelProperty(value = "支付方式，可选值：payNow, payOnDelivery")
    private String paymentMethod;

    @ApiModelProperty(value = "付款人，可选值：receiver ,sender")
    private String payerType;

    @ApiModelProperty(value = "订单模式，可选值：singleUnit, multiUnit, bigCustomer")
    @NotNull(message = "订单模式不能为空")
    private String mode;

    @ApiModelProperty(value = "是否专票 0 ,1")
    private Integer isTicket;

    @ApiModelProperty(value = "是否回单 0 ,1")
    private Integer isReceipt;

    @ApiModelProperty(value = "是否代收货款 0 ,1")
    private Integer isCollecting;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "订单车辆信息")
    private List<OrderCarInfoParam> orderCarInfoParamList;
}